<?php
//
//use Illuminate\Support\Facades\Route;
//
///*
//|--------------------------------------------------------------------------
//| Web Routes
//|--------------------------------------------------------------------------
//|
//| Here is where you can register web routes for your application. These
//| routes are loaded by the RouteServiceProvider within a group which
//| contains the "web" middleware group. Now create something great!
//|
//*/
//
////重定向至登录页面
//Route::get('/',function (){
//    return view('welcome');
//});
//
////重定向至登录页面
////Route::redirect('/','admin/login',301);
//
////后台登录页面
//Route::get('admin/login',[\App\Http\Controllers\Admin\LoginController::class,'login']);
//
////验证码路由
//Route::get('/code/captcha/{tmp}',[\App\Http\Controllers\Admin\LoginController::class,'captcha']);
//
////处理后台登录
//Route::post('admin/dologin',[\App\Http\Controllers\Admin\LoginController::class,'doLogin']);
//
////加密
//Route::get('jiami',[\App\Http\Controllers\Admin\LoginController::class,'jiami']);
//
////后台首页
//Route::view('admin/index','admin/index');
//
//Route::view('admin/welcome','welcome');
//
////测试输出数组
//Route::get('shuchu',function (){
//    //输出JSON格式
//    return [1,2,3];
//});
//
////单个资源路由
//Route::resource('blogs',\App\Http\Controllers\BlogController::class);
////批量资源路由
//Route::resources([
//    'blogs2'=>\App\Http\Controllers\BlogController::class,
//    'aa'=>\App\Http\Controllers\BlogController::class
//]);
//
////api资源路由
//Route::apiResource('blogs3',\App\Http\Controllers\ApiController::class);
////批量api资源路由
//Route::apiResources(['blogs4'=>\App\Http\Controllers\ApiController::class]);
//
////资源路由嵌套
//Route::resource('blogs.comments',\App\Http\Controllers\CommentController::class)
//    ->shallow()->name('index','b.c.i')->parameters([
//        'blogs' => 'id',
//        'comments' => 'cid'
//    ]);
//
////表单伪造和CSRF令牌保护
//Route::get('task/form',[\App\Http\Controllers\TaskController::class,'form']);
//Route::any('task/getform',function (){
//   return \Illuminate\Support\Facades\Request::method();
//});
//
////cookies
//Route::get('cookies',[\App\Http\Controllers\UserController::class,'cookies']);
//
////session
//Route::get('sess',[\App\Http\Controllers\UserController::class,'sess']);
//

//Route::post('login',[\App\Http\Controllers\Admin\LoginController::class,'login']);
